#pragma once

#include"common_buf.h"
#include "event_loop.h"
#include "net_connection.h"
//

class tcp_conn:public net_connection
{

public:

    tcp_conn(int connfd,event_loop* loop);
    void do_read(); //读业务
    void do_write();    //写业务
    void clean_conn();  //销毁链接   
    //发送消息
    int sendmessage(const char* data,int datalen,int msgid);
private:
    int _connfd;    //当前链接的fd
    event_loop* _loop;      //属于哪个链接
    input_buf _inpb;
    output_buf _oupb;
};





